
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Uniform access to a bunch of continuous integration providers.
Return a Promise
and resolve it with an object containing information
about the adapter instance.
adapter.getInfo().then(function (info) {
console.log(info);
});
// {
// "name": "Travis CI - your_account (https://api.travis-ci.org)",
// "url": "https://api.travis-ci.org/repos/your_account",
// "html_url": "https://travis-ci.org/your_account",
// "builders_url": "https://api.travis-ci.org/repos/your_account{/name}{?ids}",
// "builders": [ "your_repo", "your_other_repo" ],
// "data": { ... }
// }
Return a Promise
and resolve it with a list of builders that are known
to this adapter. A "builder" may be called differenty by your CI solution, for
example, Travis CI mainly talks about "repositories" while Jenkins calls
them "jobs".
adapter.getBuilders(info).then(function (builders) {
console.log(builders);
});
// [
// {
// "name": "your_repo",
// "url": "https://api.travis-ci.org/repos/your_account/your_repo",
// "html_url": "https://travis-ci.org/your_account/your_repo",
// "builds_url": "https://api.travis-ci.org/repos/your_account/your_repo/build{?number,after_number}",
// "builds": [ 120, 119, 118, 117, 116 ],
// "data": { ... }
// },
// {
// "name": "your_other_repo",
// "url": "https://api.travis-ci.org/repos/your_account/your_other_repo",
// "html_url": "https://travis-ci.org/your_account/your_other_repo",
// "builds_url": "https://api.travis-ci.org/repos/your_account/your_other_repo/build{?number,after_number}",
// "builds": [ 174, 173, 172, 171, 170 ],
// "data": { ... }
// }
// ]
Return a Promise
and resolve it with a list of builds that were run by the
given builder.
adapter.getBuilds( builder ).then(function (builds) {
console.log(builds);
});
// [
// {
// "name": "your_repo",
// "number": 120,
// "url": "https://api.travis-ci.org/repos/your_account/your_repo/builds/56413624",
// "html_url": "https://travis-ci.org/your_account/your_repo/builds/56413624",
// "state": "success",
// "start": Sat Oct 26 2015 01:20:00 GMT-0800 (PST),
// "end": Sat Oct 26 2015 01:21:00 GMT-0800 (PST),
// "data": { ... }
// }
// ]
The returned responses contain URIs (RFC 3986) and URI templates
(RFC 6570). Since this library provides no HTTP endpoint in and of itself,
these URIs point to the respective service the adapter is connected to. That
is, the url
field of a build object obtained from the Travis adapter will
point to the Travis API endpoint endpoint of the given build.
Each object has an html_url
property that points to an HTML representation
of the given object. For example the build-results page on Travis or the job
overview page on a Jenkins server.
Further, objects may link to sub resources, such as the builder linking to its
builds. In that case the property is to be interpreted as a URI template. The
object should provide a set of possible substitutions for the given template.
In case of the builder example above, the builder would have a builds_url
property which accepts a number
variable. The number
variable can then
be expanded with the values of the builds
array.
const builds_url = builder.builds_url; // "https://api.travis-ci.org/repos/your_account/your_repo/builds/{?number}"
const builds = builder.builds; // [ 15, 14, 13, 12 ]
const template = urltemplate(builds_url);
const urls = builder.builds.map(number => template.expand({ number }));
// [
// "https://api.travis-ci.org/repos/your_account/your_repo/builds/?number=15",
// "https://api.travis-ci.org/repos/your_account/your_repo/builds/?number=14",
// "https://api.travis-ci.org/repos/your_account/your_repo/builds/?number=13",
// "https://api.travis-ci.org/repos/your_account/your_repo/builds/?number=12"
// ]
FAQs
Uniform access to a bunch of continuous integration providers
The npm package ci-adapter receives a total of 2 weekly downloads. As such, ci-adapter popularity was classified as not popular.
We found that ci-adapter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.